package teach.day04;

import java.util.LinkedList;
import java.util.List;

//链表
public class P03LinkedListDemo {
    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        List<Integer> list = new LinkedList<>();
//        List<Integer> list = new ArrayList<Integer>();      //常用来查找
        for (int i = 0; i < 10; i++) {
            list.add(i);    //int->Integer Boxing
        }
//        System.out.println(list);
//        System.out.println(list.get(5));
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
        long end = System.currentTimeMillis();
        System.out.println((end - start) + "ms");
    }
}
